package 注解开发.main.java;

//import com.itheima.config.SpringConfig;
//import com.itheima.dao.BookDao;
//import com.itheima.service.BookService;
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.annotation.AnnotationConfigApplicationContext;
//import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 纯注解开发
 */
public class AppForAnnotation {
    public static void main(String[] args) {
        //AnnotationConfigApplicationContext加载Spring配置类初始化Spring容器
//        ApplicationContext IOC=new AnnotationConfigApplicationContext(SpringConfig.class);
//        //按名称获取bean
//        System.out.println(IOC.getBean("bookDao"));
//        //按类型获取bean
//        System.out.println(IOC.getBean(BookService.class));
    }

}
